#ifndef SCHEDULER_H_
#define SCHEDULER_H_

/*INCLUDES *******************************************************************/
#include "ses_common.h"

/* DEFINES & MACROS **********************************************************/

#define SCHEDULER_ENTRIES		20


/* TYPES ********************************************************************/

/**type of function pointer for tasks
 */
typedef void (*task_t)(void);


/* FUNCTION PROTOTYPES *******************************************************/

/**
 * Initializes the task scheduler.
 */
//void scheduler_init(task_t task);
void scheduler_init();

/**
 * Runs scheduler in an infinite loop.
 */
void scheduler_run();

/**
 * Adds new task to the scheduler. A scheduled task is executed once after the given
 * time period.
 *
 * @param task		valid pointer to task
 * @param expire	time period
 */
bool scheduler_add( task_t task, uint16_t expire);

/**
 * Removes a timer task from the scheduler.
 *
 * @param task	pointer to timer
 * */
void scheduler_remove(task_t task);

/**
 * @return maximum expire value (= no. of non-NULL tasks = queue size)
 */
//int queue_size();

#endif /* SCHEDULER_H_ */
